// 自定义变量
@primary-color: #3498db;
@primary-hover: #2980b9;

// 主容器
.number-line-visualization {
  padding: 20px;
  background: white;
  border-radius: @border-radius;
  height: 100%;
  overflow-y: auto;
}

// 头部区域
.visualization-header {
  text-align: center;
  margin-bottom: 30px;

  h3 {
    color: @text-primary;
    margin-bottom: 8px;
    font-size: 1.8rem;
  }

  p {
    color: @text-secondary;
    font-size: 1.1rem;
  }
}

.visualization-container {
  max-width: 900px;
  margin: 0 auto;
}

// 控制面板
.control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: @bg-light;
  padding: 15px 20px;
  border-radius: @border-radius-sm;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;

  label {
    font-weight: 600;
    color: @text-primary;
  }

  select {
    padding: 5px 10px;
    border: 1px solid @border-color;
    border-radius: @border-radius-xs;
    background: white;
  }
}

// 按钮样式
.reset-btn,
.hint-btn {
  padding: 8px 16px;
  border: none;
  border-radius: @border-radius-xs;
  cursor: pointer;
  font-weight: 600;
  .transition();
}

.reset-btn {
  background: @danger-color;
  color: white;

  &:hover {
    background: @danger-hover;
  }
}

.hint-btn {
  background: @primary-color;
  color: white;

  &:hover {
    background: @primary-hover;
  }
}

// 分数显示
.score-display {
  display: flex;
  gap: 15px;
  font-weight: 600;

  span:first-child {
    color: @success-color;
  }

  span:last-child {
    color: @danger-color;
  }
}

// 可拖拽数字
.draggable-numbers {
  margin-bottom: 30px;

  h4 {
    color: @text-primary;
    margin-bottom: 15px;
    text-align: center;
  }
}

.numbers-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.draggable-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  .flex-center();
  font-weight: bold;
  font-size: 18px;
  cursor: grab;
  .transition(all, 0.3s);
  box-shadow: @shadow;

  &:hover {
    transform: translateY(-2px);
    box-shadow: @shadow-md;
  }

  &.placed {
    opacity: 0.3;
    cursor: not-allowed;
  }

  &:active {
    cursor: grabbing;
  }
}

// 数轴容器
.number-line-container {
  margin: 30px 0;
  text-align: center;
}

.number-line-svg {
  max-width: 100%;
  height: auto;
  border: 1px solid @border-light;
  border-radius: @border-radius-sm;
  background: @bg-light;
}

.drop-zone {
  .transition();

  &:hover {
    fill: rgba(52, 152, 219, 0.1);
    stroke: @primary-color;
    stroke-width: 3;
  }
}

// 学习提示
.learning-tips {
  background: @bg-light;
  padding: 20px;
  border-radius: @border-radius-sm;
  margin-top: 30px;
}

.tip-section {
  h4 {
    color: @text-primary;
    margin-bottom: 12px;
  }

  ul {
    list-style: none;
    padding: 0;
  }

  li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: @border-radius-xs;
    border-left: 4px solid @primary-color;
  }
}

// 反馈信息
.feedback {
  margin-top: 15px;
  padding: 12px 16px;
  border-radius: @border-radius-lg;
  font-weight: 600;
  text-align: center;

  &.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }

  &.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    justify-content: center;
  }

  .numbers-container {
    gap: 8px;
  }

  .draggable-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
